<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<ui:composition template="/protected/templates/loggedtemplate.xhtml">

	<ui:define name="right">
		<h:form>
			<h:outputLabel value="#{msg.oneDayEmailForecast}" for="forecastCheckbox"/>
			<h:selectBooleanCheckbox id="forecastCheckbox" value="#{forecastBean.oneDayForecastAllCities}" binding="#{oneDayForecastCheckbox.oneDayForecastCheckbox}" valueChangeListener="#{oneDayForecastCheckboxListener.oneDayForecastCheckboxChanged()}" onchange="submit();" />
		</h:form><br/>
		<a href="../Image?name=forecast">#{msg.pdfLink}</a><br/>
		<a href="UserForecast?user=#{currentUserBean.username}">#{msg.pdfUserLink}</a><br/>
	</ui:define>
	<ui:define name="text">
		<ui:repeat var="city" value="#{forecastBean.cities}">					
				<table class="forecasts">
				<tr><td colspan="4"><h:outputText value="#{city.name}" /></td></tr>
				<tr>
				<ui:repeat var="forecast" value="#{city.forecasts}">
					<td>
						<h:outputText value="#{forecast.plusday}">
							<f:converter converterId="ForecastDayConverter" />
						</h:outputText><br/>
						<h:graphicImage value="/Image?name=#{forecast.conditions}" /><br/>
						<h:outputText value="#{msg.temp}: #{forecast.temperature}#{msg.celsius}" /><br/>
					</td>
				</ui:repeat>
				</tr></table><br/><br/>
			</ui:repeat>
	</ui:define>
</ui:composition>
</html>